home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 129_01.zip / RECOVER1.C < prev    next >
Text File  |  1993-06-01  |  3KB  |  75 lines

  1. #include <210ctdl.h>
  2. /*****************************************************************************/
  3. /*                recover1.c                     */
  4. /*                                         */
  5. /*          Recovery program for recovering killed rooms             */
  6. /*    This only works for room slots which have only been killed; if the   */
  7. /*    slot has been recycled (reclaimed by makeRoom), a different program  */
  8. /*    will be needed for recovery.                         */
  9. /*****************************************************************************/
  10.  
  11. /*****************************************************************************/
  12. /*                history                      */
  13. /*                                         */
  14. /* 84Jun17 HAW    Seems to work correctly.                     */
  15. /* 84Jun17 HAW    Created.                             */
  16. /*****************************************************************************/
  17.  
  18. /*****************************************************************************/
  19. /*                contents                     */
  20. /*                                         */
  21. /*    main()            Main controller for this program         */
  22. /*****************************************************************************/
  23.  
  24. /*****************************************************************************/
  25. /*                External fns                     */
  26. /*                                         */
  27. /*    crypte()        210log.c    (indirectly)             */
  28. /*    Getch()         210modem.c                     */
  29. /*    getRoom()        210roomb.c                     */
  30. /*    noteRoom()        210roomb.c                     */
  31. /*    openFile()        210rooma.c                     */
  32. /*    putRoom()        210roomb.c                     */
  33. /*    readSysTab()        210rooma.c                     */
  34. /*    setSpace()        210rooma.c                     */
  35. /*    writeSysTab()        210rooma.c                     */
  36. /*                                         */
  37. /*    The files cited above must be linked in -- additionally, this file   */
  38. /*    must be compiled using the same -e address as Citadel.             */
  39. /*****************************************************************************/
  40.  
  41. /*****************************************************************************/
  42. /*    main()    the main controller                         */
  43. /*****************************************************************************/
  44. main()
  45. {
  46.     int Index;
  47.  
  48.     printf("Got problems, eh?  Hang on a moment...\n");
  49.     if (readSysTab()) {
  50.     setSpace(homeDisk, homeUser);
  51.     openFile("ctdlroom.sys", &roomfl);
  52.  
  53.     for (Index = AIDEROOM + 1;        /* First 3 ALWAYS exist */
  54.          Index < MAXROOMS; Index++) {
  55.         if (!(roomTab[Index].rtflags & INUSE) && roomTab[Index].rtname[0]) {
  56.         printf("The room named %s may be recoverable. ",
  57.             roomTab[Index].rtname);
  58.         printf("Do you want me to try? ");
  59.         if (toupper(getch()) == 'Y') {
  60.             getRoom(Index);
  61.             roomBuf.rbflags |= INUSE;
  62.             putRoom(Index);
  63.             noteRoom();
  64.         }
  65.         putChar('\n');
  66.         }
  67.     }
  68.     printf("\n\nAll finished!  Saving... No need to reconfigure.");
  69.     writeSysTab();
  70.     }
  71. }
  72.    */
  73. /*****************************************************************************/
  74.  
  75. /***